<?php
use Illuminate\Support\Facades\Route;
use Modules\Admin\Http\Controllers\AdminController;
use Modules\Admin\Http\Middleware\AdminApiAuth;




Route::prefix('v1/admin')->middleware(AdminApiAuth::class)->group(function () {
//    后台首页
    Route::get('/index', [AdminController::class, 'index']);
//    登录
    Route::post('/login/login', [\Modules\Admin\Http\Controllers\v1\LoginController::class, 'login']);
//    刷新token
    Route::put('/index/refreshToken', [\Modules\Admin\Http\Controllers\v1\IndexController::class, 'refreshToken']);
//    获取用户信息
    Route::get('/admin/info', [\Modules\Admin\Http\Controllers\v1\IndexController::class, 'info']);
//    退出登录
    Route::delete('/index/logout', [\Modules\Admin\Http\Controllers\v1\IndexController::class, 'logout']);
//    修改密码
    Route::put('/index/updatePassword', [\Modules\Admin\Http\Controllers\v1\IndexController::class, 'updatePassword']);
//    获取模块
    Route::get('/index/getModel', [\Modules\Admin\Http\Controllers\v1\IndexController::class, 'getModel']);

});
